<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="zozopo.operations.comm.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>添加产品  - 仓库管理</title>

  </head>
  <style>
	<!--
	table {
	table-layout: fixed;
	word-wrap:break-word;
	}
	td{
		
		word-break:break-all;
	}
	
	BODY {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-FAMILY: arial,san serif
}
	//-->
</style>
  <body>
  
  <table width="100%"  border="0" cellpadding="0" cellspacing="0" height="100%">
  	<tr>
  		<td valign="top">
  			<jsp:include page="/background/head.jsp"></jsp:include>
  		</td>
  	</tr>
  	<tr>
  		<td valign="top">
  			<table width="100%"  border="0" cellpadding="0" cellspacing="0">
  
 		<tr>
    	<td width="270" align="center">
    		
    	</td>
    	<td width="100%">
    		
    		
    		
    	</td>
    </tr>
    
    <tr>
    	<td valign="top">
     		<div>
     		
     		</div>
		  	<jsp:include page="/background/left.jsp"></jsp:include>
				 
				 
				
     	</td>
     	
     	
     	<td valign="top" >
     <table border="0" cellpadding="0" cellspacing="0" >
    	 <tr>
     		<td>
     	
     	</td>
     		</tr>
 <tr>
     		<td>
<form action="warehouse/addgoods_warehouse.action" method="post" accept-charset="UTF-8" id="addgoods_warehouseForm" name="addgoods_warehouseForm"> 
				<s:token />
     <table border="0" cellpadding="0" cellspacing="0"  width="100%">
    	 <tr>
     		<td width="100%">
     	<table width="100%" border="0" cellpadding="0" bgcolor="#e5f3ff" cellspacing="0" style= "border:1px solid #ffffff; border-top-color:#6cb1f1;">
     		
     		<tr>
     			<td>添加产品
     			<input type="button" value="查看谁有权限" 
     				onclick="javascript:openUrlForDialog('selectoperatorlimitedAction_background.action?limitedCode=<s:property value="limitedcode"/>')"/>
     			</td>
     		</tr>
     	</table>
     	</td>
     		</tr>
 		<tr>
     		<td>
     			<FONT color="red"><s:property value="operationResult"/></FONT>
     			<s:fielderror id="errormessage" />
     			<br/>
     			
				<table border="0" cellpadding="0"  cellspacing="0" width="100%"  style= "border:1px solid #ffffff;" class="bottomline">
					<tr>
					
						<td width="100">商品名称:</td>
						<td><input type="text" id="name_goods" name="name_goods" size="40" maxlength="128"/></td>
						<td>
							<font color="red">注:命名规则 品牌+型号+作用和功能 例:雷蛇 地狱狂蛇 有线鼠标</font>
						</td>
					</tr>
					
					<tr>
					
						<td>单位:</td>
						<td><input type="text" id="unit_goods" name="unit_goods" size="10" maxlength="32"/></td>
						<td></td>
					</tr>
					
					<tr>
					
						<td>商品条码:</td>
						<td><input type="text" id="barcode_goods" name="barcode_goods" size="20" maxlength="32"/></td>
						<td></td>
					</tr>
					
					
					<tr>
					
						<td>商品介绍连接:</td>
						<td><input type="text" id="url_goods" name="url_goods" size="50" maxlength="320"/></td>
						<td></td>
					</tr>
					
					<tr>
					
						<td>商品图片:</td>
						<td><input type="text" id="image_goods" name="image_goods" size="50" maxlength="320" value="<s:property value="goods.image_goods"/>"/></td>
						<td></td>
					</tr>
					
					<tr>
					
						<td>商品重量(kg):</td>
						<td><input type="text" id="kg_goods" name="kg_goods" size="50" maxlength="320" value="<s:property value="goods.kg_goods"/>"/></td>
						<td></td>
					</tr>
					
					<tr>
					
						<td>商品类别:</td>
						<td>
							<s:iterator id="goodsclassMap" value="goodsclassMap"> 
									<s:if test="value.parentid_goodsclass == 0">
										<br/>
									</s:if>
									
									<input type="checkbox" id="goodsclassid_goodsclasslist" name="goodsclassid_goodsclasslist" value="<s:property value="value.id_goodsclass"/>"> <s:property value="value.name_goodsclass"/></input>
									
									<s:if test="value.parentid_goodsclass == 0">
										<br/>
									</s:if>
							</s:iterator>
							<input type="hidden" id="goodsclassjson" name="goodsclassjson"/>
						</td>
						<td></td>
					</tr>
					
					
					<tr>
						<td>描述/备注:</td>
						<td><textarea id="remark_goods" name="remark_goods" ></textarea></td>
						<td></td>
					</tr>
					

				</table>
			

	</td>
     		</tr>
     		 <tr>
     		<td>
     			<button type="button" onclick="insertgoodsSubmit()">添加</button>
		
     	</td>
     	</tr>
     	
     	
     	
     	</table>
     	</form>
	</td>
     		</tr>
     		 <tr>
     		<td>
     		
		
     	</td>
     	</tr>
     	
     	
     	
     	</table>
	</td>
</tr>

</table>
  		</td>
  	</tr>
  	<tr>
  		<td valign="bottom">
  			<jsp:include page="/background/tail.jsp"></jsp:include>
  		
  		</td>
  	</tr>
  
  </table>
  </body>
  
   <script type="text/javascript">
  
  function insertgoodsSubmit(){
		var limitJSON = "[";
		var i=0;
		var limitedLength = $('input:checked').size();
		$('input:checked').each(function(i){
			 //alert($(this).val());
			 
			 limitJSON += "'" + $(this).val()+"'";
			 if((i+1)!=limitedLength){
				 limitJSON += ",";
			 }
			 i++;
		});
		limitJSON +="]";
		
		$("#goodsclassjson").attr('value',limitJSON);
		
		addgoods_warehouseForm.submit();
}
  </script>
</html>
